package cn.stylefeng.guns.sys.modular.dataQualityCheck.mapper;

import cn.stylefeng.guns.sys.modular.dataQualityCheck.entity.EtlJob;
import cn.stylefeng.guns.sys.modular.dataQualityCheck.entity.QualityCheck;
import cn.stylefeng.guns.sys.modular.dataQualityCheck.model.params.QualityCheckParam;
import cn.stylefeng.guns.sys.modular.dataQualityCheck.model.result.QualityCheckResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 数据质量检查 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2020-11-18
 */
public interface QualityCheckMapper extends BaseMapper<QualityCheck> {

    /**
     * 获取列表
     *
     * @author author
     * @Date 2020-11-18
     */
    List<QualityCheckResult> customList(@Param("paramCondition") QualityCheckParam paramCondition);

    /**
     * 获取map列表
     *
     * @author author
     * @Date 2020-11-18
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") QualityCheckParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author author
     * @Date 2020-11-18
     */
    Page<QualityCheckResult> customPageList(@Param("page") Page page, @Param("paramCondition") QualityCheckParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author author
     * @Date 2020-11-18
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") QualityCheckParam paramCondition);

    /**
     * etl_job表插入数据
     * @param paramCondition
     */
    void insertEtlJob(@Param("paramCondition") EtlJob paramCondition);


    /**
     * 删除etl_job记录
     * @param paramCondition
     */
    void deleteEtlJob(@Param("paramCondition") EtlJob paramCondition);

    /**
     * 根据不同条件查询etl_job详情
     * @param paramCondition
     * @return
     */
    List<EtlJob> searchEtlJob(@Param("paramCondition") EtlJob paramCondition);


    /**
     * 退回
     * @param paramCondition
     * @return
     */
    int returnCheckData(@Param("paramCondition") Integer paramCondition);


    /**
     * 通过元数据名称查询部门
     * @param paramCondition
     * @return
     */
    List<String> queryDepartment(@Param("paramCondition") String paramCondition);

}
